from typing import *


class Solution:

    def maxSubarrays(self, nums: List[int]) -> int:
        ans = 0
        tot = t = -1
        for i in range(len(nums)):
            tot = nums[i] if tot == -1 else tot & nums[i]
            t = nums[i] if t == -1 else t & nums[i]
            if t == 0:
                ans += 1
                t = -1
        return ans if tot == 0 else 1


class Solution:

    def maxSubarrays(self, nums: List[int]) -> int:
        ans = 0
        t = -1
        for v in nums:
            t &= v
            if t == 0:
                ans += 1
                t = -1
        return max(ans, 1)
